﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <link href="~/Content/KindEditor/themes/default/default.css" rel="stylesheet" />
    <script src="~/Scripts/KindEditor/kindeditor.js"></script>
    <script src="~/Scripts/KindEditor/lang/zh_CN.js"></script>
    <script src="~/Scripts/jquery-2.1.4.js"></script>
    <script src="~/Scripts/bootstrap.js"></script>
    <title>编辑</title>
    <script>
        KindEditor.ready(function (K) {
            window.editor = K.create('#editor_id',
                {
                    uploadJson: '/Upload/Index',
                    //fileManagerJson: '/FileProcess/DownLoad/1',  //文件空间管理
                    allowFileManager: true,
                    filterMode: false,
                    items: [
        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
        'anchor', 'link', 'unlink', '|', 'about'
                    ]
                });
        });
    </script>
</head>
<body>
    <div class="container">
        <br />
        @using (Html.BeginForm("Save", "Read", FormMethod.Post, new { @class = "form-horizontal", ENCTYPE = "multipart/form-data" }))
        {
            <div class="row">
                <div class="col-md-1">
                    <span>标题</span>
                </div>
                <div class="col-md-6">
                    <input type="text" name="title" value="" class="form-control" />
                </div>
                <div class="col-md-5">
                    <input type="hidden" value="@ViewData["CategoryId"]" name="CategoryId"  />
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-md-1">
                    <span>缩略图</span>
                </div>
                <div class="col-md-4">
                    @*<img style="width:100px;height:100px;" src="/FileProcess/DownLoad/0" />*@
                    <input id="btn_cover" type="file" class="btn btn-primary" name="imgFile" />
                    <input type="hidden" id="Cover" />
                </div>
                <div class="col-md-2">
                   
                </div>
                <div class="col-md-5">
                    @*<input type="file" id="fileupload_cover" name="file" accept="image/gif,image/jpeg,image/bmp,image/png,image/ico,image/jpg" multiple="multiple" style="display: none">
                        <img id="img_cover" src="" style="width:100px;height:100px;" target="" />*@
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-md-12">
                    <textarea id="editor_id" name="content" style="width:100%;height:500px;"></textarea>
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-md-11"></div>
                <div class="col-md-1">
                    <input type="submit" class="btn btn-primary" value="提交" />
                </div>
            </div>
        }
    </div>


</body>
</html>
